<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>智能体Solo模式 - 配置页面3</title>
    <style>
        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            margin: 0;
            padding: 0;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            color: #333;
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 40px 20px;
        }
        .header {
            text-align: center;
            margin-bottom: 40px;
            background: rgba(255, 255, 255, 0.95);
            padding: 30px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        }
        .header h1 {
            color: #2c3e50;
            font-size: 2.2em;
            margin: 0 0 10px 0;
            font-weight: 700;
        }
        .header p {
            color: #7f8c8d;
            font-size: 1.1em;
            margin: 0;
        }
        .card {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 15px;
            padding: 30px;
            margin-bottom: 30px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease;
        }
        .card:hover {
            transform: translateY(-5px);
        }
        .card h2 {
            color: #34495e;
            margin-top: 0;
            margin-bottom: 20px;
            font-size: 1.6em;
            border-bottom: 3px solid #3498db;
            padding-bottom: 10px;
        }
        .card h3 {
            color: #2980b9;
            margin-top: 25px;
            margin-bottom: 15px;
            font-size: 1.3em;
        }
        .dashboard-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        .stat-card {
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
            padding: 25px;
            border-radius: 12px;
            text-align: center;
            box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
        }
        .stat-card h4 {
            margin: 0 0 15px 0;
            font-size: 1.1em;
            font-weight: 500;
            opacity: 0.9;
        }
        .stat-value {
            font-size: 2.5em;
            font-weight: bold;
            margin: 0 0 10px 0;
        }
        .stat-change {
            font-size: 0.9em;
            opacity: 0.9;
        }
        .stat-change.positive {
            color: #2ecc71;
        }
        .stat-change.negative {
            color: #e74c3c;
        }
        .config-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
        }
        .config-section {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            border-left: 4px solid #3498db;
        }
        .config-section h4 {
            color: #2980b9;
            margin-top: 0;
            margin-bottom: 15px;
            font-size: 1.2em;
        }
        .form-group {
            margin-bottom: 15px;
        }
        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: bold;
            color: #34495e;
        }
        .form-group input,
        .form-group select {
            width: 100%;
            padding: 10px;
            border: 2px solid #ddd;
            border-radius: 8px;
            font-size: 16px;
            transition: border-color 0.3s ease;
        }
        .form-group input:focus,
        .form-group select:focus {
            outline: none;
            border-color: #3498db;
        }
        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 60px;
            height: 34px;
        }
        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 34px;
        }
        .slider:before {
            position: absolute;
            content: "";
            height: 26px;
            width: 26px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }
        input:checked + .slider {
            background-color: #3498db;
        }
        input:checked + .slider:before {
            transform: translateX(26px);
        }
        .toggle-group {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }
        .toggle-group label {
            font-weight: bold;
            color: #34495e;
        }
        .resource-bar {
            width: 100%;
            height: 20px;
            background: #ecf0f1;
            border-radius: 10px;
            overflow: hidden;
            margin-bottom: 20px;
        }
        .resource-fill {
            height: 100%;
            background: linear-gradient(90deg, #2ecc71, #27ae60);
            transition: width 0.3s ease;
        }
        .resource-label {
            display: flex;
            justify-content: space-between;
            margin-bottom: 5px;
            font-size: 0.9em;
            color: #7f8c8d;
        }
        .resource-percentage {
            font-weight: bold;
        }
        .schedule-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }
        .schedule-table th,
        .schedule-table td {
            padding: 12px 15px;
            text-align: left;
            border-bottom: 1px solid #ddd;
        }
        .schedule-table th {
            background-color: #f8f9fa;
            color: #34495e;
            font-weight: bold;
        }
        .schedule-table tr:hover {
            background-color: #f8f9fa;
        }
        .action-buttons {
            display: flex;
            gap: 10px;
        }
        .action-btn {
            padding: 5px 12px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 0.9em;
            transition: all 0.3s ease;
        }
        .action-btn.edit {
            background: #3498db;
            color: white;
        }
        .action-btn.edit:hover {
            background: #2980b9;
        }
        .action-btn.delete {
            background: #e74c3c;
            color: white;
        }
        .action-btn.delete:hover {
            background: #c0392b;
        }
        .save-button {
            background: #2ecc71;
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 8px;
            font-size: 18px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
            margin-top: 30px;
        }
        .save-button:hover {
            background: #27ae60;
            transform: translateY(-2px);
            box-shadow: 0 7px 20px rgba(46, 204, 113, 0.4);
        }
        .navigation {
            text-align: center;
            margin-top: 40px;
        }
        .nav-button {
            background: #3498db;
            color: white;
            border: none;
            padding: 12px 30px;
            margin: 0 10px;
            border-radius: 30px;
            font-size: 1em;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
        }
        .nav-button:hover {
            background: #2980b9;
            transform: translateY(-2px);
            box-shadow: 0 7px 20px rgba(52, 152, 219, 0.4);
        }
        .alert {
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 20px;
        }
        .alert.success {
            background: #e8f5e9;
            border-left: 4px solid #2ecc71;
            color: #27ae60;
        }
        .alert.warning {
            background: #fff3cd;
            border-left: 4px solid #f39c12;
            color: #d35400;
        }
        .alert.info {
            background: #e3f2fd;
            border-left: 4px solid #3498db;
            color: #2980b9;
        }
        .tag {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.8em;
            font-weight: bold;
            margin-right: 5px;
        }
        .tag.success {
            background: #2ecc71;
            color: white;
        }
        .tag.warning {
            background: #f39c12;
            color: white;
        }
        .tag.info {
            background: #3498db;
            color: white;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>⚡ Solo模式高级配置 - 任务与资源管理</h1>
            <p>管理智能体任务调度和系统资源分配</p>
        </div>
        
        <div class="card">
            <h2>系统资源监控与配置</h2>
            
            <div class="dashboard-grid">
                <div class="stat-card">
                    <h4>CPU使用率</h4>
                    <div class="stat-value">35%</div>
                    <div class="stat-change positive">↓ 12%</div>
                </div>
                <div class="stat-card">
                    <h4>内存使用</h4>
                    <div class="stat-value">62%</div>
                    <div class="stat-change negative">↑ 8%</div>
                </div>
                <div class="stat-card">
                    <h4>任务队列</h4>
                    <div class="stat-value">12</div>
                    <div class="stat-change positive">↓ 5</div>
                </div>
                <div class="stat-card">
                    <h4>活跃智能体</h4>
                    <div class="stat-value">2</div>
                    <div class="stat-change positive">→ 0</div>
                </div>
            </div>
            
            <h3>资源限制配置</h3>
            <div class="config-grid">
                <div class="config-section">
                    <h4>CPU资源限制</h4>
                    <div class="form-group">
                        <label>最大CPU使用率 (%)</label>
                        <input type="range" min="10" max="100" value="75" style="width: 100%;">
                    </div>
                    <div class="form-group">
                        <label>CPU亲和性</label>
                        <select>
                            <option value="auto">自动</option>
                            <option value="balanced">平衡模式</option>
                            <option value="performance">性能模式</option>
                            <option value="efficiency">效率模式</option>
                        </select>
                    </div>
                </div>
                
                <div class="config-section">
                    <h4>内存资源限制</h4>
                    <div class="form-group">
                        <label>最大内存使用 (MB)</label>
                        <input type="number" value="2048" min="512" max="8192">
                    </div>
                    <div class="form-group">
                        <label>内存回收策略</label>
                        <select>
                            <option value="aggressive">激进</option>
                            <option value="balanced" selected>平衡</option>
                            <option value="conservative">保守</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="card">
            <h2>任务调度配置</h2>
            
            <div class="alert info">
                <strong>💡 提示：</strong> 调整任务调度参数可以优化智能体的工作效率和系统响应时间。
            </div>
            
            <div class="config-grid">
                <div class="config-section">
                    <h4>调度策略</h4>
                    <div class="form-group">
                        <label>优先级调度</label>
                        <select>
                            <option value="fair" selected>公平调度</option>
                            <option value="priority">优先级调度</option>
                            <option value="round-robin">轮询调度</option>
                            <option value="shortest-job-first">短作业优先</option>
                        </select>
                    </div>
                    
                    <div class="toggle-group">
                        <label>启用智能调度</label>
                        <label class="toggle-switch">
                            <input type="checkbox" checked>
                            <span class="slider"></span>
                        </label>
                    </div>
                    
                    <div class="toggle-group">
                        <label>启用负载均衡</label>
                        <label class="toggle-switch">
                            <input type="checkbox" checked>
                            <span class="slider"></span>
                        </label>
                    </div>
                </div>
                
                <div class="config-section">
                    <h4>任务超时与重试</h4>
                    <div class="form-group">
                        <label>默认任务超时 (秒)</label>
                        <input type="number" value="60" min="10" max="300">
                    </div>
                    <div class="form-group">
                        <label>最大重试次数</label>
                        <input type="number" value="3" min="0" max="10">
                    </div>
                    <div class="form-group">
                        <label>重试间隔 (秒)</label>
                        <input type="number" value="5" min="1" max="60">
                    </div>
                </div>
            </div>
            
            <h3>任务调度计划</h3>
            <table class="schedule-table">
                <thead>
                    <tr>
                        <th>任务ID</th>
                        <th>智能体</th>
                        <th>类型</th>
                        <th>状态</th>
                        <th>优先级</th>
                        <th>预计执行时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>TASK-2023-10-01-001</td>
                        <td>侦探助手</td>
                        <td>证据分析</td>
                        <td><span class="tag success">已完成</span></td>
                        <td>高</td>
                        <td>2分钟前</td>
                        <td class="action-buttons">
                            <button class="action-btn edit">编辑</button>
                        </td>
                    </tr>
                    <tr>
                        <td>TASK-2023-10-01-002</td>
                        <td>人物剖析专家</td>
                        <td>性格分析</td>
                        <td><span class="tag info">进行中</span></td>
                        <td>中</td>
                        <td>约3分钟</td>
                        <td class="action-buttons">
                            <button class="action-btn edit">编辑</button>
                            <button class="action-btn delete">取消</button>
                        </td>
                    </tr>
                    <tr>
                        <td>TASK-2023-10-01-003</td>
                        <td>侦探助手</td>
                        <td>矛盾检测</td>
                        <td><span class="tag warning">等待中</span></td>
                        <td>中</td>
                        <td>未开始</td>
                        <td class="action-buttons">
                            <button class="action-btn edit">编辑</button>
                            <button class="action-btn delete">删除</button>
                        </td>
                    </tr>
                </tbody>
            </table>
            
            <button class="save-button">保存所有配置</button>
        </div>
        
        <div class="navigation">
            <button class="nav-button" onclick="window.location.href='config-page-2.html'">上一页</button>
            <button class="nav-button" onclick="window.location.href='execution-page-1.html'">前往执行页面</button>
        </div>
    </div>
</body>
</html>